package cn.echo.consul.manager.entity;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * token数据载体
 * @param <T>
 * @author lonyee
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=false)
public class Claim<T extends Object> {

    //发布时间 issued at
    @JsonProperty("iat")
    private Long issuedAt;
    //刷新时间 refresh at
    @JsonProperty("rst")
    private Long refreshAt;
    //过期时间 expiration
    @JsonProperty("exp")
    private Long expiration;
    //透传携带数据 payload
    @JsonProperty("pod")
    private T payload;

    //使用时间不能早于该时间
    //private Long nbf;
    //唯一ID编号 JWT ID
    //private String jti;
    //接受者 audience
    //private String aud;
    //主题 subject
    //private String sub;
    //发布者 issuer
    //private String iss;

}
